




/*
*************************************************************************
*西瑞克斯研发管理系统
*版 本: 1.0   
*日 期：02/08/2012    
*作 者： 王浩 QQ：873987060   
*************************************************************************   
*/ 
package com.application.role.service;
import java.util.List;
import com.manager.BaseService;
import com.manager.commons.page.PageBean;
import com.application.role.entity.Role;
import com.application.role.struts.form.RoleForm;
import com.application.role.dao.RoleDAO;
 /**
 * 
 * Description:RoleService<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 左磊 QQ：30575951    <br />
 * 
 * History: <br />
 * 
 * 02/08/2012 
 * 
 */
public class RoleService extends BaseService
{
	private RoleDAO roleDAO;

	public RoleDAO getRoleDAO() {
		return this.roleDAO;
	}

	public void setRoleDAO(RoleDAO roleDAO) {
		this.roleDAO = roleDAO;
	}
        

        public Role getRole(Role role) {
		return (Role) this.getBaseDao().queryByPk(role, role.getId());
	}
	
	public Integer getAllCountRole(RoleForm roleForm){
		return this.roleDAO.getAllCountRole(roleForm);
	}
	
	public List<Role> searchRole(RoleForm roleForm, PageBean pageBean) throws Exception {
		List<Role> roleList = (List) this.roleDAO.searchRole(roleForm, pageBean);
		return roleList;
	}
        
        public void deleteRoles(RoleForm roleForm){
	   this.roleDAO.deleteRoles(roleForm);	 
	}
        public List searchRole(final RoleForm roleForm) {
    		List<Role> roleList = (List) this.roleDAO.searchRole(roleForm);
    		return roleList;
    	}
}
